package com.file.upload.repository;

import com.file.upload.entity.FileChunk;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * @Description
 * @Author lhj
 * @Date 2025/4/23 21:26
 */
@Repository
public interface FileChunkRepository extends JpaRepository<FileChunk, Long> {
    List<FileChunk> findByFileId(String fileId);
    Optional<FileChunk> findByFileIdAndChunkNumber(String fileId, Integer chunkNumber);
    List<FileChunk> findByFileIdAndChunkStatus(String fileId, Integer chunkStatus);
}